package cn.xxstudy.visitshop.base.fragment

import androidx.appcompat.widget.Toolbar
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import cn.xxstudy.visitshop.R
import cn.xxstudy.visitshop.base.adapter.OnItemClickListener
import cn.xxstudy.visitshop.util.configAppearance
import kotlinx.android.synthetic.main.fragment_visit.*
import kotlinx.android.synthetic.main.include_toolbar.*

/**
 * @author ：DELL on 2021/3/25 .
 * @packages ：cn.xxstudy.visitshop.base.fragment .
 * TODO:一句话描述
 */
abstract class BaseFragment<T> : LazyFragment(), Toolbar.OnMenuItemClickListener,
    SwipeRefreshLayout.OnRefreshListener, OnItemClickListener<T> {

    abstract val title: String

    override fun initView() {
        toolbarTitle.text = title
        toolBar.inflateMenu(R.menu.menu_visit)
        toolBar.setOnMenuItemClickListener(this)
    }
}